package cn.tedu.review;
/*回顾接口的使用*/
public class TestInter {
    public static void main(String[] args) {
        System.out.println(Inter.age);
        //Inter.age=30;
        new Inter() {
            @Override
            public void eat() {
                System.out.println("eat方法" +
                        "");
            }

            @Override
            public void play() {

            }
        }.eat();

    }

}
interface Inter{
    //public Inter();
    int age=20;
    void eat();
    void play();

}
abstract class InterImpl implements Inter{

    @Override
    public void eat() {

    }

}
class InterImpl2 implements Inter{
    public InterImpl2(){
        super();
    }
    @Override
    public void eat() {

    }

    @Override
    public void play() {

    }
}